<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>设备</title>
    <meta name="context-path" th:content="@{/}"/>
    <link rel="stylesheet" th:href="@{/resources/matrix/css/bootstrap.min.css}"/>
    <link rel="stylesheet" th:href="@{/resources/matrix/css/bootstrap-responsive.min.css}"/>
    <link rel="stylesheet" th:href="@{/resources/matrix/css/matrix-style.css}"/>
    <link rel="stylesheet" th:href="@{/resources/matrix/css/matrix-media.css}"/>
    <link rel="stylesheet" th:href="@{/resources/matrix/css/matrix-full.css}"/>
    <link rel="stylesheet" th:href="@{/resources/matrix/font-awesome/css/font-awesome.css}"/>
    <link rel="stylesheet" th:href="@{/resources/layui/css/layui.css}" media="all">
    <link rel="stylesheet" th:href="@{/resources/css/website.css}"/>
</head>
<body class="childbody">
<div class="container-fluid">
    <div class="row-fluid">
        <div class="layui-tab layui-tab-brief">
            <ul class="layui-tab-title">
                <li class="layui-this">数据</li>
                <li>属性</li>
            </ul>
            <div class="layui-tab-content">
                <div class="layui-tab-item layui-show">
                    <div class="widget-box">
                        <div class="widget-content nopadding">
                            <input type="hidden" id="parentId" name="parentId" th:value="${parentId}"/>
                            <div class="table_actions">
                                <button id="btnAddPart" class="btn  btn-primary">添加部件</button>
                                <button id="btnAddDynamicPoint" class="btn  btn-primary">添加动态测点</button>
                                <button id="btnAddStaticPoint" class="btn  btn-primary">添加静态测点</button>
                                <button id="btnDelete" class="btn btn-danger">删除</button>
                            </div>
                            <table id="tablelist" class="layui-table" lay-filter="category_list">
                            </table>
                        </div>
                    </div>
                </div>
                <div id="property" class="layui-tab-item">
                </div>
            </div>
        </div>
    </div>
</div>
<script th:src="@{/resources/matrix/js/jquery.min.js}"></script>
<script th:src="@{/resources/matrix/js/jquery.ui.custom.js}"></script>
<script th:src="@{/resources/matrix/js/bootstrap.min.js}"></script>
<script th:src="@{/resources/matrix/js/matrix.js}"></script>
<script th:src="@{/resources/js/website.js}"></script>
<script th:src="@{/resources/layui/layui.all.js}" charset="utf-8"></script>
<script th:src="@{/resources/js/system.js}"></script>
<script th:src="@{/resources/js/monitor/monitor_tree.js}"></script>
<script th:src="@{/resources/js/monitor/monitor_tree_common.js}"></script>
<script th:src="@{/resources/js/monitor/monitor_tree_operator.js}"></script>
<script th:inline="javascript">
    $(document).keyup(function (event) {
        if (event.keyCode == 13) {
            search();
        }
    });

    layui.use(['jquery', 'layer', 'table', 'laydate'], function () {
        $("#btnAddPart").bind("click", function (event) {
            addPart.openDialog();
        });

        $("#btnAddDynamicPoint").bind("click", function (event) {
            addDynamicPoint.openDialog();
        });

        $("#btnAddStaticPoint").bind("click", function (event) {
            addStaticPoint.openDialog();
        });

        $("#btnDelete").bind("click", function (event) {
            deleteNodes.submit();
        });

        var editUrl = contextRoot + "device/getEditDevice/" + $("#parentId").val();
        $("#property").load(editUrl);

        selectNodeId = $("#parentId").val();
        queryChildren.reload();
    });
</script>
</body>
</html>